<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <title>购物车</title>
    <link rel="stylesheet" th:href="@{/cart.css}">
    <!--引入jquery-->
    <script th:src="@{/public/jquery-3.7.1.min.js}"></script>
    <script th:src="@{/public/layer_v3.1.1/3.1.1/layer.js}"></script>

    <!--注意：获取请求域中的值，转换为js变量-->
    <script th:inline="javascript">
        const site = /*[[${site}]]*/"";
    </script>

    <!--引入自己的js-->
    <script th:src="@{/cart.js}"></script>
</head>
<body>
<!--头部-->
<header>
    <div class="back"></div>
    <div class="text">购物车</div>
    <div class="btn">编辑</div>
</header>

<!--主体部分-->
<div class="main">
    <div class="addr">
        <div>先锋侠需要您的精确坐标</div>
        <div class="arrow"></div>
    </div>
    <div class="time">
        <div>收货时间</div>
        <div class="text"><a href="#">今天30分钟可送达(可预订)</a></div>
        <div class="arrow"></div>
    </div>
    <div class="list">
        <div class="header">
            <span class="my-radio"></span>
            <i>精品推荐</i>
        </div>
        <ul class="cart-list">
            <li th:each="catrs : ${cart}">
                <div class="my-radio"></div>
                <div th:style="'width:100px; height: 100px; background: url(' + 'http://localhost:8888/store' + ${catrs.good.pic} + ') no-repeat center center/cover; '"></div>
                <div class="desc">
                    <div th:text="${catrs.good.name}"></div>
                    <div th:text="${catrs.good.price}"></div>
                    <div>
                        <i></i>
                        <span th:text="${catrs.count}"></span>
                        <i></i>
                    </div>
                </div>
            </li>
        </ul>
        <div class="footer">
            本店总计：￥<i>0.00</i>
        </div>
    </div>
</div>

<!--结算-->
<div class="checkout">
    <div class="check-all">
        <span class="my-radio"></span>
        <i>全选</i>
        <b>合计:</b>
        <span style="display: inline-block">￥<i>0.00</i></span>
    </div>
    <div class="btn">去结算</div>
</div>

<!--脚部-->
<footer>
    <div class="index">
        <i></i>
        <b>首页</b>
    </div>
    <div class="category">
        <i></i>
        <b>分类</b>
    </div>
    <div class="cart">
        <i></i>
        <b>购物车</b>
    </div>
    <div class="my">
        <i></i>
        <b>我的</b>
    </div>
</footer>
</body>
</html>